home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 9536 / 9536.xpi / chrome / commentsbar_ff.jar / content / commentsbar_ff / postinst.xul < prev    next >
Extensible Markup Language  |  2009-03-25  |  2KB  |  70 lines

  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
  3.  
  4. <dialog title=""
  5.         xmlns:html="http://www.w3.org/1999/xhtml"
  6.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  7.     buttons="accept,cancel"
  8.     ondialogaccept="return savesettings();"
  9. >
  10.    
  11. <script>
  12. <![CDATA[
  13. /*var tool=null;
  14.  
  15. function ToolBarInit(maintool)
  16. {
  17. try{
  18. tool = maintool;
  19. }catch(e){alert(e);}
  20. }
  21. */
  22.  
  23.  
  24. function savesettings()
  25. {
  26. try{
  27.  
  28.  
  29.     if(document.getElementById("searchpage").checked) 
  30.         {
  31.         var searchService =Components.classes["@mozilla.org/browser/search-service;1"].getService(Components.interfaces.nsIBrowserSearchService); 
  32.         var engine=searchService.getEngineByName(name);
  33.         searchService.addEngine("https://www.commentsbar.com/ff/fast.src",2,"https://www.commentsbar.com/i/oneriot.gif",false);
  34.         Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch).setCharPref("browser.search.selectedEngine",name)
  35.         }
  36.     if(document.getElementById("homepage").checked) 
  37.         {
  38.         Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch).setCharPref("browser.startup.homepage","http://www.commentsbar.com/home/?src=FF");
  39.         
  40.         }
  41.     //tool.close_tbdefpagesdialog();
  42.     
  43. }catch(e){alert(e);}
  44. }
  45.  
  46. function setText(textID,val)
  47. {
  48.   document.getElementById(textID).value=val;
  49. }
  50.  
  51. ]]>
  52. </script>
  53.  
  54.  
  55.  
  56.  <groupbox flex="1">
  57.   <caption label="Settings" />
  58.  
  59.     <checkbox  flex="1" id="searchpage" value="a1"  label="Make OneRiot social search engine your default."  checked="true" />
  60.     <checkbox  flex="1" id="homepage" value="a2"  label="Make OneRiot your social homepage."  checked="true"  />
  61.  
  62.  </groupbox>
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. </dialog>